package web.admin.shop.category;

import domain.shop.Category;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.PropertyModel;

public final class CategoryUserObject extends Panel {

    Category category;

    public CategoryUserObject(String id, Category category) {
        super(id);
        this.category = category;
        show();
    }

    private void show() {
        add(new Form("mainForm") {

            {
                add(new CheckBox("checkbox"));
                add(new Label("name", new PropertyModel(category, "name")));
            }
        });
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }
}
